Skip to content

fix: enhance project initialization and menu transformation capabilities#631

Open
NoOne7135 wants to merge 3 commits into
mainfrom
feature/AdminForth/1647/do-not-create-a-prism-if-the-d
Open

fix: enhance project initialization and menu transformation capabilities#631
NoOne7135 wants to merge 3 commits into
mainfrom
feature/AdminForth/1647/do-not-create-a-prism-if-the-d

Conversation

@NoOne7135
Copy link
Copy Markdown
Collaborator

No description provided.

This comment was marked as duplicate.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comment on lines 160 to +168
const answers = await inquirer.prompt(questions);
const resolvedOptions = {
...options,
appName: options.appName || answers.appName,
db: options.db || answers.db,
useNpm: options.useNpm || answers.useNpm,
};

if (
resolvedOptions.includePrismaMigrations === undefined &&
isPrismaMigrationDbUrl(resolvedOptions.db)
) {
const prismaAnswer = await inquirer.prompt([{
type: 'select',
name: 'includePrismaMigrations',
message: 'Include Prisma migrations? >',
choices: [
{ name: 'Yes', value: true },
{ name: 'No', value: false },
],
default: true,
}]);
resolvedOptions.includePrismaMigrations = prismaAnswer.includePrismaMigrations;
} else {
resolvedOptions.includePrismaMigrations = Boolean(resolvedOptions.includePrismaMigrations);
}
resolvedOptions.existingDb = options.dbProvided || resolvedOptions.db !== DEFAULT_DB_URL;
resolvedOptions.includePrismaMigrations = !resolvedOptions.existingDb && isPrismaMigrationDbUrl(resolvedOptions.db);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants